package com.anti.modular.bus.billdepositadjustment.controller;

import com.anti.commom.annotation.BusinessLog;
import com.anti.commom.api.Result;
import com.anti.commom.enums.LogAnnotionOpTypeEnum;
import com.anti.modular.bus.billdepositadjustment.param.BillDepositParam;
import com.anti.modular.bus.billdepositadjustment.service.BillDepositAdjustmentService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @program: anti
 * @title:押金调整
 * @author:
 * @date: 2021-06-24 18:47
 **/
@RestController
@RequestMapping("billdepositadjustment")
public class BillDepositAdjustmentController {

    @Resource
    private BillDepositAdjustmentService billDepositAdjustmentService;

    /**
     * 添加租金调整记录
     *
     */
    @PostMapping("add")
    @BusinessLog(title = "押金调整记录_增加", opType = LogAnnotionOpTypeEnum.ADD)
    public Result add(@RequestBody @Validated(BillDepositParam.add.class) BillDepositParam billDepositParam) {
        billDepositAdjustmentService.add(billDepositParam);
        return Result.success("新增成功");
    }

}
